package com.sunriz.motordrive.server.common;

import com.sunriz.motordrive.domain.DTO.Result;

/**
 * ClassName: SerialPort
 * Package: com.sunriz.motordrive.server
 * Description:
 *
 * @Author BuTang
 * @Create 2024/4/29 15:11
 * @Version 1.0
 */
public interface BaseSerial {

    /**
     * 开启串口
     * @param port 串口id
     * @return Result成功or失败
     */
    Result enableSerialPort(String port, int baudRate);

    /**
     * 关闭串口
     * @return Result成功or失败
     */
    Result disableSerialPort();

    Result getPorts();

    Result sendModbus(byte[] bytes);

//    ResultVO motorEnableSerialPort();
//    ResultVO hcEnableSerialPort();
//    ResultVO disableSerialPort();
//    ResultVO check();
//    ResultVO getPorts();

}
